
#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a = 0;
    scanf("%d", &a);
	if (a < 1)
		printf("a", a);
	else if (a < 10)
		printf("%d", (2*a - 1));
	else
		printf("%d", (3*a - 11));

	return 0;
}